package com.bungarus.rm.repo;

import com.bungarus.rm.model.CacheContainer;
import com.bungarus.rm.model.IDMakerScope;
import com.bungarus.rm.model.UniqueNodeID;

import java.util.List;
import java.util.Optional;

/**
 * Created by tang on 2019/1/13.
 */
public interface MsgIDScopeRepository extends CacheContainer{
    String SCOPE_DELIMIT = ",";

    Optional<IDMakerScope> findById(UniqueNodeID uniqueNodeID);

    List<IDMakerScope> findAllScopes();

    void saveScope(IDMakerScope scope);

    List<String> findAllScopePlaceholders();

    void saveScopePlaceholder(int dcholder, int wkholder);

    void updateScopePlaceholder(int dcholder, int wkholder, int oldwk);

    void deleteById(UniqueNodeID id);
}
